/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.faith.mahounoshoujo.game.model.character.element;

import static com.faith.mahounoshoujo.game.model.character.element.ElementCharacteristicRank.*;

/**
 *
 * @author Faith
 */
public enum ElementCharacteristic {
    FIRE(FIRE_ID, AIR_ID, WATER_ID),
    WATER(WATER_ID, FIRE_ID, EARTH_ID),
    EARTH(EARTH_ID, WATER_ID, AIR_ID),
    AIR(AIR_ID, EARTH_ID, FIRE_ID);

    private int id;

    private int inferiorElement;

    private int superiorElement;

    private ElementCharacteristic(int id, int inferiorElement, int superiorElement) {
        this.id = id;
        this.inferiorElement = inferiorElement;
        this.superiorElement = superiorElement;
    }

    public boolean isSuperiorElement(ElementCharacteristic otherElement){
        return this.superiorElement == otherElement.id;
    }

    public boolean isInferiorElement(ElementCharacteristic otherElement){
        return this.inferiorElement == otherElement.id;
    }
}
